package reflect;

import reflect.anno.AutoRunMethod;

import java.lang.reflect.Method;

public class reflectDemo9 {
    public static void main(String[] args) throws Exception {
        Class<?> aClass = Class.forName("reflect.Person");
        Method declaredMethods = aClass.getDeclaredMethod("seeHello1");
        if (declaredMethods.isAnnotationPresent(AutoRunMethod.class)){
            AutoRunMethod annotation = declaredMethods.getAnnotation(AutoRunMethod.class);
            System.out.println(annotation.value());

        }

    }
}
